package com.sprouting.ops.model.bo;

import com.sprouting.ops.annotations.invoke.CheckIsNullOrEmpty;
import com.sprouting.ops.annotations.invoke.CheckLength;
import com.sprouting.ops.annotations.invoke.CheckNotNull;
import com.sprouting.ops.interfaces.AddGroup;
import com.sprouting.ops.interfaces.UpdGroup;
import com.sprouting.ops.model.OpsSysDictGroup;
import lombok.Data;

/**
 * 字典
 *
 * @author ：LX（长沙麓谷）
 * @date 创建时间： 2025/8/14 21:11
 */
@Data
public class OpsSysDictBo {

    /**
     * 主键
     */
    @CheckNotNull(message = "非法ID", groups = UpdGroup.class)
    @CheckIsNullOrEmpty(message = "无效ID", groups = AddGroup.class)
    private String id;
    /**
     * 字典组ID
     * @see OpsSysDictGroup#getId()
     */
    @CheckNotNull(message = "请选择字典组")
    private String sysDictGroupId;
    /**
     * 字典编号-字典组+00x 同组内有且唯一
     */
    @CheckNotNull(message = "请输入字典编号")
    @CheckLength(min = 1, max = 50, message = "字典编号超过长度限制")
    private String code;
    /**
     * 字典名称
     */
    @CheckNotNull(message = "请输入字典名称")
    @CheckLength(min = 1, max = 150, message = "字典名称超过长度限制")
    private String name;
    /**
     * 数据值
     */
    @CheckLength(max = 500, message = "数据值超过长度限制")
    private String value;
    /**
     * 是否基础数据
     * @see com.sprouting.ops.interfaces.ConstantBase.BaseData
     */
    private Integer baseData;
    /**
     * 备注
     */
    @CheckLength(max = 2000, message = "备注超过长度限制")
    private String remark;
    /**
     * 排序,默认99
     * @see com.sprouting.ops.interfaces.ConstantBase.DefaultValue#SORT
     */
    private String sort;

}
